{extends file="./main.tpl"}
{block name=head}
{/block}
{block name=body}
<center>
	<form name="truckTrakingFrm" method="POST" action="truckTracking.php">
    <table>
      <tr>
        <td class="table1">Truck No</td>
        <td class="table2">
          <select name="truckNo" autofocus>
          	<option value="0">Select Truck</option>
            {html_options values=$truck.truckId output=$truck.truckNo selected=$truckId}
          </select>
        </td>
        <td class="table1">From</td>
        <td class="table2">{html_select_date prefix="from" start_year ="2001" end_year="+2" field_order="DMY" month_format="%m" day_value_format="%02d"}</td>
        <td class="table1">To</td>
        <td class="table2">{html_select_date prefix="to" start_year ="2001" end_year="+2" field_order="DMY" month_format="%m" day_value_format="%02d"}</td>
        <td class="table1"><input type="submit" name="submitBtn" value="Submit"></td>
    	</tr>
    </table>
  </form>
  <table>
    <tr>
      <th class="table1">From Branch</th>
      <th class="table1">Loading date</th>
      <th class="table1">To Branch</th>
      <th class="table1">Driver Name</th>
      <th class="table1">Unloading date</th>
    </tr>
    {section name="tt" loop=$loadArray}
    <tr>
    	<td class="table2">{$loadArray[tt].fromBranch}</td>
      <td class="table2">{$loadArray[tt].invoiceDate}</td>
      <td class="table2">{$loadArray[tt].toBranch}</td>
      <td class="table2">{$loadArray[tt].driverName}</td>
      {if {$loadArray[tt].unloadStatus} eq 'N'}
      <td class="table2"><font color="red"><b>Not Unloded</b></font></td>
      {else}
      <td class="table2">{$loadArray[tt].unloadingDate}</td>
      {/if}
    </tr>
    {/section}
  </table>
</center>
{/block}